package bupt.xixi.learning.test.event;

import bupt.xixi.learning.context.ApplicationListener;
import lombok.extern.slf4j.Slf4j;

import java.time.LocalTime;

@Slf4j
public class CustomEventListener implements ApplicationListener<CustomEvent> {
    @Override
    public void onApplicationEvent(CustomEvent event) {
        log.info("收到：{} 消息； 时间: {}", event.getSource(), LocalTime.now());
        log.info("消息：{} : {}", event.getId(), event.getMessage());
    }
}
